'\" t
.\"     Title: \fBmysqlserverinfo\fR
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\"      Date: 01/14/2017
.\"    Manual: MySQL Utilities
.\"    Source: MySQL 1.6.4
.\"  Language: English
.\"
.TH "\FBMYSQLSERVERINFO\F" "1" "01/14/2017" "MySQL 1\&.6\&.4" "MySQL Utilities"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
mysqlserverinfo \- Display Common Diagnostic Information from a Server
.SH "SYNOPSIS"
.HP \w'\fBmysqlserverinfo\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb1\fR\fR\fB\ [\fR\fB\fI:db2\fR\fR\fB]\ \&.\&.\&.\fR\ 'u
\fBmysqlserverinfo [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb1\fR\fR\fB [\fR\fB\fI:db2\fR\fR\fB] \&.\&.\&.\fR
.SH "DESCRIPTION"
.PP
This utility displays critical information about a server for use in diagnosing problems\&. The information displayed includes the following:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Server connection information
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Server version number
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Data directory path name
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Base directory path name
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Plugin directory path name
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Configuration file location and name
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Current binary log coordinates (filename and position)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Current relay log coordinates (filename and position)
.RE
.PP
This utility can be used to see the diagnostic information for servers that are running or offline\&. If you want to see information about an offline server, the utility starts the server in read\-only mode\&. In this case, you must specify the
\fB\-\-basedir\fR,
\fB\-\-datadir\fR, and
\fB\-\-start\fR
options to prevent the utility from starting an offline server accidentally\&. Note: Be sure to consider the ramifications of starting an offline server on the error and similar logs\&. It is best to save this information prior to running this utility\&.
.PP
To specify how to display output, use one of the following values with the
\fB\-\-format\fR
option:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBgrid\fR
(default)
.sp
Display output in grid or table format like that of the
\fBmysql\fR
client command\-line tool\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBcsv\fR
.sp
Display output in comma\-separated values format\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBtab\fR
.sp
Display output in tab\-separated format\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBvertical\fR
.sp
Display output in single\-column format like that of the
\eG
command for the
\fBmysql\fR
client command\-line tool\&.
.RE
.PP
To turn off the headers for
\fBgrid\fR,
\fBcsv\fR, or
\fBtab\fR
display format, specify the
\fB\-\-no\-headers\fR
option\&.
.PP
To see the common default settings for the local server\*(Aqs configuration file, use the
\fB\-\-show\-defaults\fR
option\&. This option reads the configuration file on the machine where the utility is run, not the machine for the host that the
\fB\-\-server\fR
option specifies\&.
.PP
To run the utility against several servers, specify the
\fB\-\-server\fR
option multiple times\&. In this case, the utility attempts to connect to each server and read the information\&.
.PP
To see the MySQL servers running on the local machine, use the
\fB\-\-show\-servers\fR
option\&. This shows all the servers with their process ID and data directory\&. On Windows, the utility shows only the process ID and port\&.
OPTIONS.PP
\fBmysqlserverinfo\fR
accepts the following command\-line options:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-help
.sp
Display a help message and exit\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-license
.sp
Display license information and exit\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-basedir=\fIbasedir\fR
.sp
The base directory for the server\&. This option is required for starting an offline server\&.
.sp
Is also used to access server tools, such as my_print_defaults that is required to read the login\-path values from the login configuration file (\&.mylogin\&.cnf)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-datadir=\fIdatadir\fR
.sp
The data directory for the server\&. This option is required for starting an offline server\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-format=\fIformat\fR, \-f\fIformat\fR
.sp
Specify the output display format\&. Permitted format values are
\fBgrid\fR,
\fBcsv\fR,
\fBtab\fR, and
\fBvertical\fR\&. The default is
\fBgrid\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-no\-headers, \-h
.sp
Do not display column headers\&. This option applies only for
\fBgrid\fR,
\fBcsv\fR, and
\fBtab\fR
output\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-port\-range=\fIstart:end\fR
.sp
The port range to check for finding running servers\&. This option applies only to Windows and is ignored unless
\fB\-\-show\-servers\fR
is given\&. The default range is 3306:3333\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-server=\fIserver\fR
.sp
Connection information for a server\&. Use this option multiple times to see information for multiple servers\&.
.sp
To connect to a server, it is necessary to specify connection parameters such as the user name, host name, password, and either a port or socket\&. MySQL Utilities provides a number of ways to supply this information\&. All of the methods require specifying your choice via a command\-line option such as \-\-server, \-\-master, \-\-slave, etc\&. The methods include the following in order of most secure to least secure\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Use login\-paths from your
\&.mylogin\&.cnf
file (encrypted, not visible)\&. Example :
\fIlogin\-path\fR[:\fIport\fR][:\fIsocket\fR]
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Use a configuration file (unencrypted, not visible) Note: available in release\-1\&.5\&.0\&. Example :
\fIconfiguration\-file\-path\fR[:\fIsection\fR]
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Specify the data on the command\-line (unencrypted, visible)\&. Example :
\fIuser\fR[:\fIpasswd\fR]@\fIhost\fR[:\fIport\fR][:\fIsocket\fR]
.RE
.sp
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-show\-defaults, \-d
.sp
Display default settings for
\fBmysqld\fR
from the local configuration file\&. It uses
\fBmy_print_defaults\fR
to obtain the options\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-show\-servers
.sp
Display information about servers running on the local host\&. The utility examines the host process list to determine which servers are running\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-ssl\-ca
.sp
The path to a file that contains a list of trusted SSL CAs\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-ssl\-cert
.sp
The name of the SSL certificate file to use for establishing a secure connection\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-ssl\-key
.sp
The name of the SSL key file to use for establishing a secure connection\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-ssl
.sp
Specifies if the server connection requires use of SSL\&. If an encrypted connection cannot be established, the connection attempt fails\&. Default setting is 0 (SSL not required)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-start, \-s
.sp
Start the server in read\-only mode if it is offline\&. With this option, you must also give the
\fB\-\-basedir\fR
and
\fB\-\-datadir\fR
options\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-start\-timeout
.sp
Number of seconds to wait for the server to be online when started in read\-only mode using the
\fB\-\-start\fR
option\&. The default value is 10 seconds\&.
.sp
The
\-\-start\-timeout
option is available as of MySQL Utilities 1\&.2\&.4 / 1\&.3\&.3\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-verbose, \-v
.sp
Specify how much information to display\&. Use this option multiple times to increase the amount of information\&. For example,
\fB\-v\fR
= verbose,
\fB\-vv\fR
= more verbose,
\fB\-vvv\fR
= debug\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-version
.sp
Display version information and exit\&.
.RE
.PP
For the
\fB\-\-format\fR
option, the permitted values are not case sensitive\&. In addition, values may be specified as any unambiguous prefix of a valid value\&. For example,
\fB\-\-format=g\fR
specifies the grid format\&. An error occurs if a prefix matches more than one valid value\&.
.PP
The path to the MySQL client tools should be included in the PATH environment variable in order to use the authentication mechanism with login\-paths\&. This permits the utility to use the my_print_defaults tools which is required to read the login\-path values from the login configuration file (\&.mylogin\&.cnf)\&.
EXAMPLES.PP
To display the server information for the local server and the settings for
\fBmysqld\fR
in the configuration file with the output in a vertical list, use this command:
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBmysqlserverinfo \-\-server=root:pass@localhost \-d \-\-format=vertical\fR
# Source on localhost: \&.\&.\&. connected\&.
*************************       1\&. row *************************
         server: localhost:3306
        version: 5\&.1\&.50\-log
        datadir: /usr/local/mysql/data/
        basedir: /usr/local/mysql\-5\&.1\&.50\-osx10\&.6\-x86_64/
     plugin_dir: /usr/local/mysql\-5\&.1\&.50\-osx10\&.6\-x86_64/lib/plugin
    config_file: /etc/my\&.cnf
     binary_log: my_log\&.000068
 binary_log_pos: 212383
      relay_log: None
  relay_log_pos: None
1 rows\&.
Defaults for server localhost:3306
  \-\-port=3306
  \-\-basedir=/usr/local/mysql
  \-\-datadir=/usr/local/mysql/data
  \-\-server_id=5
  \-\-log\-bin=my_log
  \-\-general_log
  \-\-slow_query_log
  \-\-innodb_data_file_path=ibdata1:778M;ibdata2:50M:autoextend
#\&.\&.\&.done\&.
.fi
.if n \{\
.RE
.\}
.sp
PERMISSIONS REQUIRED.PP
The permissions required include the ability to read the mysql database and to have read access to the data directory\&.
.PP
The user must have permissions to read the data directory or use an administrator or super user (sudo) account to obtain access to the data directory\&.
.SH "COPYRIGHT"
.br
.PP
Copyright \(co 2006, 2017, Oracle and/or its affiliates. All rights reserved.
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
.PP
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MySQL Utilities and Fabric
documentation, which is available online at
http://dev.mysql.com/doc/index-utils-fabric.html
.SH AUTHOR
Oracle Corporation (http://dev.mysql.com/).
